<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <title></title>
  <meta http-equiv="content-type" content="text/html; charset=latin1">
  <style type="text/css">
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 125%; }
body .hll { background-color: #ffffcc }
body  { background: #f8f8f8; }
body .c { color: #008800; font-style: italic } /* Comment */
body .err { border: 1px solid #FF0000 } /* Error */
body .k { color: #AA22FF; font-weight: bold } /* Keyword */
body .o { color: #666666 } /* Operator */
body .cm { color: #008800; font-style: italic } /* Comment.Multiline */
body .cp { color: #008800 } /* Comment.Preproc */
body .c1 { color: #008800; font-style: italic } /* Comment.Single */
body .cs { color: #008800; font-weight: bold } /* Comment.Special */
body .gd { color: #A00000 } /* Generic.Deleted */
body .ge { font-style: italic } /* Generic.Emph */
body .gr { color: #FF0000 } /* Generic.Error */
body .gh { color: #000080; font-weight: bold } /* Generic.Heading */
body .gi { color: #00A000 } /* Generic.Inserted */
body .go { color: #888888 } /* Generic.Output */
body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
body .gs { font-weight: bold } /* Generic.Strong */
body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
body .gt { color: #0044DD } /* Generic.Traceback */
body .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */
body .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */
body .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */
body .kp { color: #AA22FF } /* Keyword.Pseudo */
body .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */
body .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */
body .m { color: #666666 } /* Literal.Number */
body .s { color: #BB4444 } /* Literal.String */
body .na { color: #BB4444 } /* Name.Attribute */
body .nb { color: #AA22FF } /* Name.Builtin */
body .nc { color: #0000FF } /* Name.Class */
body .no { color: #880000 } /* Name.Constant */
body .nd { color: #AA22FF } /* Name.Decorator */
body .ni { color: #999999; font-weight: bold } /* Name.Entity */
body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
body .nf { color: #00A000 } /* Name.Function */
body .nl { color: #A0A000 } /* Name.Label */
body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
body .nt { color: #008000; font-weight: bold } /* Name.Tag */
body .nv { color: #B8860B } /* Name.Variable */
body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
body .w { color: #bbbbbb } /* Text.Whitespace */
body .mf { color: #666666 } /* Literal.Number.Float */
body .mh { color: #666666 } /* Literal.Number.Hex */
body .mi { color: #666666 } /* Literal.Number.Integer */
body .mo { color: #666666 } /* Literal.Number.Oct */
body .sb { color: #BB4444 } /* Literal.String.Backtick */
body .sc { color: #BB4444 } /* Literal.String.Char */
body .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */
body .s2 { color: #BB4444 } /* Literal.String.Double */
body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
body .sh { color: #BB4444 } /* Literal.String.Heredoc */
body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
body .sx { color: #008000 } /* Literal.String.Other */
body .sr { color: #BB6688 } /* Literal.String.Regex */
body .s1 { color: #BB4444 } /* Literal.String.Single */
body .ss { color: #B8860B } /* Literal.String.Symbol */
body .bp { color: #AA22FF } /* Name.Builtin.Pseudo */
body .vc { color: #B8860B } /* Name.Variable.Class */
body .vg { color: #B8860B } /* Name.Variable.Global */
body .vi { color: #B8860B } /* Name.Variable.Instance */
body .il { color: #666666 } /* Literal.Number.Integer.Long */

  </style>
</head>
<body>
<h2></h2>

<div class="highlight"><pre><span class="c">#export LD_PRELOAD=/usr/lib/libmpi.so python</span>
<span class="kn">from</span> <span class="nn">libatomism</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">plotPES</span> <span class="kn">import</span> <span class="o">*</span>   
<span class="kn">from</span> <span class="nn">repro</span> <span class="kn">import</span> <span class="o">*</span>   
<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">scipy.stats</span> <span class="kn">as</span> <span class="nn">stats</span>

<span class="n">msLogger</span><span class="o">.</span><span class="n">setPriorityMin</span><span class="p">(</span><span class="n">Priority</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>

<span class="n">unit</span><span class="o">=</span><span class="n">msUnitsManager</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;Angstrom Degree amu kcal/mol ps&quot;</span><span class="p">)</span>

<span class="n">zmat</span><span class="o">=</span><span class="n">msZMat</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;zmat&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">&quot;C O 0 1.15 O 0 5. 1 120 H 2 0.98 0 90 1 180.&quot;</span><span class="p">)</span>
<span class="n">system</span><span class="o">=</span><span class="n">msSystem</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span><span class="o">.</span><span class="n">addEntity</span><span class="p">(</span><span class="n">zmat</span><span class="p">)</span>

<span class="c">#viewer=msVisualizerAtoms.New()</span>
<span class="c">#viewer.watch(system)</span>

<span class="n">gcoors</span> <span class="o">=</span> <span class="n">msGeneralizedCoordinates</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span>
<span class="n">q0</span> <span class="o">=</span> <span class="n">msScalarVariable</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;Angstrom&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mf">2.</span><span class="p">,</span> <span class="mf">1.45</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">,</span> <span class="mf">0.05</span><span class="p">,</span> <span class="mf">0.05</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;q0&quot;</span><span class="p">)</span>
<span class="n">q1</span> <span class="o">=</span> <span class="n">msScalarVariable</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;Degree&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">180</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">181</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;q1&quot;</span><span class="p">)</span>
<span class="n">gcoors</span><span class="o">.</span><span class="n">addVar</span><span class="p">(</span><span class="n">q0</span><span class="p">)</span><span class="o">.</span><span class="n">addVar</span><span class="p">(</span><span class="n">q1</span><span class="p">)</span>

<span class="n">kinfct0</span><span class="o">=</span><span class="n">msParser</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;Angstrom&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">setCoordinates</span><span class="p">(</span><span class="n">gcoors</span><span class="p">)</span><span class="o">.</span><span class="n">setExpression</span><span class="p">(</span><span class="s">&quot;q0&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;f=q0&quot;</span><span class="p">)</span>
<span class="n">kinfct1</span><span class="o">=</span><span class="n">msParser</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;Degree&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">setCoordinates</span><span class="p">(</span><span class="n">gcoors</span><span class="p">)</span><span class="o">.</span><span class="n">setExpression</span><span class="p">(</span><span class="s">&quot;q1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;f=q1&quot;</span><span class="p">)</span>

<span class="n">kinop</span><span class="o">=</span><span class="n">msKineticOperator</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">gcoors</span><span class="p">,</span><span class="n">system</span><span class="p">)</span><span class="o">.</span><span class="n">addDynamicDof</span><span class="p">(</span><span class="n">zmat</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="n">kinfct0</span><span class="p">)</span><span class="o">.</span><span class="n">addDynamicDof</span><span class="p">(</span><span class="n">zmat</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="n">kinfct1</span><span class="p">)</span>

<span class="n">epot</span> <span class="o">=</span> <span class="n">pesHOCO</span><span class="o">.</span><span class="n">New</span><span class="p">()</span><span class="o">.</span><span class="n">setCoordinates</span><span class="p">(</span><span class="n">gcoors</span><span class="p">)</span>
<span class="n">epot</span><span class="o">.</span><span class="n">setKineticOperator</span><span class="p">(</span><span class="n">kinop</span><span class="p">)</span>
<span class="n">repro</span> <span class="o">=</span> <span class="n">setrepro</span><span class="p">(</span><span class="n">kinop</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">15</span><span class="p">)</span>

<span class="n">database</span> <span class="o">=</span> <span class="n">msDiracs</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="s">&quot;kcal/mol&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">setCoordinates</span><span class="p">(</span><span class="n">gcoors</span><span class="p">)</span>

<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s">&#39;DataAI.txt&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">w</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">()</span> 	<span class="c"># read first line</span>
    <span class="n">array</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">f</span><span class="p">:</span> 		<span class="c"># read rest of lines</span>
        <span class="n">array</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()]</span>
	<span class="n">value</span> <span class="o">=</span> <span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">array</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="mf">188.656188</span><span class="p">)</span> <span class="o">*</span> <span class="mf">627.51</span>
	<span class="n">array</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">array</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
	<span class="n">vec</span> <span class="o">=</span> <span class="n">VectorOfDouble</span><span class="p">()</span>
        <span class="n">vec</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span> <span class="n">arg</span> <span class="k">for</span> <span class="n">arg</span> <span class="ow">in</span> <span class="n">array</span><span class="p">)</span>
        <span class="n">database</span><span class="o">.</span><span class="n">addDirac</span><span class="p">(</span><span class="n">vec</span><span class="p">,</span> <span class="n">value</span> <span class="p">)</span>

<span class="n">invpb</span><span class="o">=</span><span class="n">uqBayesianScalarModel</span><span class="o">.</span><span class="n">New</span><span class="p">()</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setModel</span><span class="p">(</span> <span class="n">epot</span> <span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setDatabase</span><span class="p">(</span> <span class="n">database</span> <span class="p">)</span>

<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a0&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">10</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a1&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">20</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a2&quot;</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">20</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a3&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a4&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">60</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a5&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;a6&quot;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">20</span><span class="p">)</span>

<span class="n">msLogger</span><span class="o">.</span><span class="n">setPriorityMin</span><span class="p">(</span><span class="n">Priority</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
<span class="n">msLogger</span><span class="o">.</span><span class="n">setVerboseLevel</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="n">NSample</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">getParameters</span><span class="p">()</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;ChainLength&quot;</span><span class="p">,</span><span class="n">NSample</span><span class="p">,</span><span class="s">&quot;&quot;</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">getParameters</span><span class="p">()</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;ChainLength&quot;</span><span class="p">,</span><span class="n">NSample</span><span class="p">,</span><span class="s">&quot;&quot;</span><span class="p">)</span>
<span class="n">invpb</span><span class="o">.</span><span class="n">getParameters</span><span class="p">()</span><span class="o">.</span><span class="n">setParameter</span><span class="p">(</span><span class="s">&quot;DisplayStepRatio&quot;</span><span class="p">,</span><span class="mf">0.5</span><span class="p">,</span><span class="s">&quot;&quot;</span><span class="p">)</span>

<span class="n">invpb</span><span class="o">.</span><span class="n">infer</span><span class="p">()</span>

<span class="n">postPDFsample</span> <span class="o">=</span> <span class="n">invpb</span><span class="o">.</span><span class="n">getPosteriorPDF</span><span class="p">()</span>
<span class="n">param</span> 	      <span class="o">=</span> <span class="n">postPDFsample</span><span class="o">.</span><span class="n">getUqParameters</span><span class="p">()</span>
<span class="n">postPDFsample</span><span class="o">.</span><span class="n">set95CI</span><span class="p">()</span>
<span class="k">print</span> <span class="n">param</span>

<span class="n">fig</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">()</span>
<span class="c">#fig, axes = plt.subplots(2, 2)</span>

<span class="n">plotPES3d</span><span class="p">(</span><span class="n">kinop</span><span class="p">,</span><span class="n">repro</span><span class="p">,</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span><span class="n">projection</span><span class="o">=</span><span class="s">&#39;3d&#39;</span><span class="p">)</span> <span class="p">)</span>  

<span class="n">histoCorrel</span><span class="p">(</span><span class="n">postPDFsample</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>

<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">50</span><span class="p">):</span>
    <span class="n">postPDFsample</span><span class="o">.</span><span class="n">getRndPoint</span><span class="p">()</span>
    <span class="n">plotPES</span><span class="p">(</span><span class="n">epot</span><span class="p">,</span><span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>  
 
<span class="n">plotRepro</span><span class="p">(</span><span class="n">kinop</span><span class="p">,</span><span class="n">repro</span><span class="p">,</span><span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>


<span class="n">msLogger</span><span class="o">.</span><span class="n">setPriorityMin</span><span class="p">(</span><span class="n">Priority</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>
<span class="n">motion</span> <span class="o">=</span> <span class="n">msLagrangian</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span><span class="o">.</span><span class="n">setEqOfMotion</span><span class="p">(</span><span class="n">kinop</span><span class="p">,</span><span class="n">epot</span><span class="p">)</span>

<span class="n">s</span> <span class="o">=</span> <span class="mf">1.8</span>
<span class="n">q0</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="mf">1.45</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;q0&quot;</span><span class="p">)</span>
<span class="n">q1</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">180</span><span class="p">,</span> <span class="mf">1.</span><span class="p">,</span> <span class="mf">1.</span><span class="p">)</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;q1&quot;</span><span class="p">)</span>
<span class="n">postPDFsample</span><span class="o">.</span><span class="n">getRndPoint</span><span class="p">()</span>

<span class="n">ax</span><span class="o">=</span><span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">10</span><span class="p">):</span>
   <span class="n">postPDFsample</span><span class="o">.</span><span class="n">getRndPoint</span><span class="p">()</span> 
   <span class="n">emin</span> <span class="o">=</span> <span class="n">epot</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="mi">180</span><span class="p">)</span>
   <span class="n">T</span><span class="o">=</span><span class="p">[]</span>
   <span class="n">Q</span><span class="o">=</span><span class="p">[]</span>
   <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">10</span><span class="p">):</span>
       <span class="n">t</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">+</span> <span class="mi">300</span><span class="o">*</span><span class="n">j</span>
       <span class="n">T</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
       <span class="n">q</span><span class="o">=</span> <span class="n">motion</span><span class="o">.</span><span class="n">Q</span><span class="p">(</span><span class="n">t</span><span class="p">)</span><span class="o">*</span><span class="n">exp</span><span class="p">(</span><span class="n">emin</span><span class="o">/</span><span class="p">(</span><span class="mf">1.98e-3</span><span class="o">*</span><span class="n">t</span><span class="p">))</span>
       <span class="n">Q</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> <span class="n">q</span> <span class="p">)</span>
       <span class="k">print</span> <span class="n">t</span><span class="p">,</span><span class="n">q</span>
   <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">T</span><span class="p">,</span><span class="n">Q</span><span class="p">,</span><span class="s">&#39;-&#39;</span><span class="p">)</span>

<span class="n">ax</span><span class="o">.</span><span class="n">axis</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span><span class="mi">3000</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">6</span><span class="p">))</span>
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s">&quot;Temperature [K]&quot;</span><span class="p">,</span><span class="n">fontsize</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s">&quot;Partition function&quot;</span><span class="p">,</span><span class="n">fontsize</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
<span class="n">ax</span><span class="o">.</span><span class="n">tick_params</span><span class="p">(</span><span class="n">labelsize</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">set_size_inches</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span><span class="mi">20</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="s">&#39;HOCO_0.png&#39;</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</body>
</html>
